<?php
/**
 * Created by PhpStorm.
 * User: JACK.L
 * Date: 2018/6/8
 * Time: 17:49
 */

namespace app\index\validate;

use think\Validate;

class Driver extends Validate
{
    protected $rule =   [
        'warehouse'  => 'require',
        'driver_id'   => 'require',
        'start_location' => 'require',
        'end_location'=>'require',
        'city'=>'require',
        'departure_time'=>'require',
        'end_time'=>'require',
        'address'=>'require',
        'regoin'=>'require',
        'phone'=>'require'
    ];

    protected $message  =   [
        'warehouse.require' => 'WareHouse 必须填写',
        'driver_id.require'     => 'Driver ID必须填写',
        'start_location.require'   => 'Start Location必须填写',
        'end_location.require'  => 'End Location必须填写',
        'city.require'        => 'City 必须填写',
      //  'lat.require'        => '邮箱格式错误',
      //  'lng.require'        => '邮箱格式错误',
        'address.require'        => 'Address 必须填写',
        'regoin.require'        => 'Region 必须填写',
        'departure_time.require'        => 'Departure Time 必须填写',
        'end_time.require'        => 'End Time 必须填写',
        'phone.require'        => 'Phone 必须填写'
    ];
    protected $scene = [
        'edit'  =>  ['warehouse'  , 'start_location' , 'end_location', 'city', 'address', 'regoin', 'phone','end_time','departure_time']
    ];

}